<template>
	<view class="content">
		<u-navbar bgColor="transparent" titleStyle="color:#fff" title="账户设置" leftIconColor="#fff" :autoBack="true"
			:placeholder="false">
		</u-navbar>
		<view class="content-box">
			<view class="item" @click="revise('/pages/my/set/login_psd')">
				<view>
					修改登录密码
				</view>
				<u-icon name="arrow-right" color="#fff" size="20"></u-icon>
			</view>
			<view class="item" @click="revise('/pages/my/set/pay_psd')">
				<view>
					修改支付密码
				</view>
				<u-icon name="arrow-right" color="#fff" size="20"></u-icon>
			</view>
			<view class="item" @click="quit">
				<view>
					安全退出
				</view>
				<u-icon name="arrow-right" color="#fff" size="20"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {
			quit() {
				let app = this
				uni.showModal({
					content: '确定要退出吗',
					success: function(res) {
						if (res.confirm) {
							uni.showToast({
								title: '正在退出',
								icon: 'none'
							})
							uni.removeStorageSync('token')
							app.$RongIMLib.disconnect().then(() => {
								console.log('成功断开')
							})
							setTimeout(() => {
								uni.navigateTo({
									url: '/pages/login/index'
								})
							}, 2000)
						} else if (res.cancel) {

						}
					}
				})
			},
			revise(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>
<style>
	page {
		background-color: #17191A;
	}
</style>
<style lang="scss" scoped>
	.content {
		min-height: 100vh;
		background-image: url('../../../static/my/my-bg.png');
		background-repeat: no-repeat;
		background-size: 100% 558rpx;
		padding-top: 88rpx;
		.content-box {
			padding: 30rpx;

			.item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				border-bottom: 1rpx solid rgba(255, 255, 255, .4);
				padding: 30rpx 0;
				font-size: 28rpx;
				font-weight: 600;
				color: #fff;
			}
		}
	}
</style>